home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Installer SDK Cornucopia 1.0.2 / Script Examples / • Example Example / Makefile < prev   
Encoding:
Makefile  |  1996-09-30  |  5.5 KB  |  125 lines  |  [TEXT/MPS ]

  1. #
  2. #    makefile for "Example.r"
  3. #
  4. #
  5. #        to build installer script :
  6. #            1) select "Build" from "Build" menu
  7. #            2) type script name "Example" ( note: ".r" is omitted )
  8. #            
  9. #        to build debug version of installer script :
  10. #            1) select "Build" from "Build" menu
  11. #            2) type script name "Example.debug"
  12. #            
  13. #
  14. #
  15. #    NOTE: All the example makefiles use the standard of no quotes around
  16. #    the variable assignments and use of double quotes around each expanded
  17. #    variable within the commands in the makefile. As a general rule this
  18. #    is not necessary, but was requested from some of our user's for
  19. #    compatability with their scripts that run the example makefiles.
  20. #
  21. #    As a general rule, when using paths, filenames or variables within
  22. #    the command lines of a makefile you should only need to use single
  23. #    or double quotes around a value that contains spaces. We have gone
  24. #    overboard in use of quotes to allow for folks changing the paths
  25. #     and filenames, so that if anyone adds a space character somewhere,
  26. #    the modified makefile will still work.
  27. #
  28.  
  29. # • script names
  30.  
  31. # the installer script name
  32. scriptName                = Example
  33. # the debug version installer script name
  34. debugScriptName            = "{scriptName}.debug"
  35. # filename for ScriptCheck extension that will run when ScriptCheck does
  36. localScriptCheckExtName    = {scriptName}.scx
  37.  
  38. # • tool names
  39.  
  40. # You may want to change the paths or names of the InstaCompOne tools that are
  41. # provided with the 4.0.3 SDK. If you do change their names, you should
  42. # update the variable assignments below.
  43.  
  44. # InstaCompOne compression tool
  45. compressTool            = {InstaCompOneDir}InstaCompOneTool
  46.  
  47. # InstaCompOne splitting tool
  48. splitTool                = {InstaCompOneDir}FileAndRsrcSplitterTool
  49.  
  50. # Original ScriptCheck Extension
  51. ScriptCheckExtension    = {InstaCompOneDir}InstaCompOneSCExt.rsrc
  52.  
  53. # • support directory names
  54.  
  55. # You may change the following paths as you see fit. Currently all paths 
  56. # are set so that scripts will compile when using the original directory
  57. # layout from the Installer 4.0.3 SDK.
  58.  
  59. # You may place the ScriptCheck tool in the 'MPW:Tools:' directory. Doing this
  60. # removes the need for the {ScriptCheckDir} variable within the makefile.
  61. # The same applies for the FileAndRsrcSplitterTool that is not used in this
  62. # example, but is used in the four examples for InstaCompOne compression
  63. # and splitting.
  64. ScriptCheckDir            = :::Tools:Released:ScriptCheck 4.0.3:
  65.  
  66. # directory where the InstaCompOne stuff can be found
  67. InstaCompOneDir            = :::Tools:Released:InstaCompOne 1.1:
  68.  
  69. # You may place "InstallerTypes.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  70. # Doing this removes the need for the {InstallerRIncDir} variable or -i specification
  71. # for Rez and compile ( C ) commands within the makefile. The same applies to the rest
  72. # of the Developer Interface files. Placing the contents of the developer interface
  73. # folders provided with the 4.0.3 SDK into your 'MPW:Interfaces:' folders will eliminate
  74. # the need for any of the 'Installer_IncDir' variables within the example makefiles.
  75. # Be careful not to replace the entire folders within your 'MPW:Interfaces:' folder
  76. # with the installer interface folders. You should ADD the contents of the installer
  77. # Developer Interface folders to your 'MPW:Interface:' folders, by opening the Installer
  78. # interface folders one at a time, and adding the contents of each folder to the 
  79. # appropriate 'MPW:Interfaces:' folder. Example: open the installer
  80. # 'Developer Interfaces:RIncludes:' folder, then drag it's contents into your
  81. # 'MPW:Interfaces:RIncludes:' folder. Repeat this process for each of the installer
  82. # interfaces folders.
  83. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  84.  
  85. # You may place "Installer Debugger.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  86. # Doing this removes the need for the {InstallerDebuggerDir} variable within the makefile.
  87. InstallerDebuggerDir    = :::Tools:Released:Installer Debugger 4.0.3:
  88.  
  89.  
  90. # source file to be compressed
  91. SimpleSourceFileName    = Example File
  92. # archive file to be compressed into
  93. SimpleArchiveName        = :Disk 1:Tome
  94.  
  95. # make the debug version of finished installer script
  96. "{debugScriptName}" ƒ "{scriptName}"
  97.     # make a copy of the finished installer script and rename the copy
  98.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  99.     # add the installer debugger resources to the copied installer script
  100.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  101.  
  102. # make the standard version of finished installer script
  103. "{scriptName}" ƒ makefile "{scriptName}.r" "{SimpleArchiveName}" "{localScriptCheckExtName}"
  104.     # establish current date with time of NOON
  105.     set theTime    "'`date -d -s` 12:00:00 PM'"
  106.     # rez the installer source into the form that the installer can read
  107.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}" 
  108.     # establish filename for finished installer script, set creation date and time, set attributes
  109.     SetFile -a b -d {theTime} "{scriptName}"
  110.     # run scriptcheck utility on the rezzed installer script
  111.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  112.     # set modification date and time for finished installer script
  113.     SetFile -m {theTime} "{scriptName}"
  114.  
  115. # do the simple compression
  116. "{SimpleArchiveName}" ƒ makefile "{SimpleSourceFileName}"
  117.     # compress entire source file into one archive
  118.     "{compressTool}" "{SimpleSourceFileName}" -o "{SimpleArchiveName}"
  119.  
  120. # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
  121. "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
  122.     # copy and rename the original scriptcheck extension
  123.     Duplicate -y "{ScriptCheckExtension}" "{localScriptCheckExtName}"
  124.  
  125.